# -*- encoding:utf-8 -*-
# !/usr/bin/env python
'''
    python-0820-03.py
    ======================
    @descript: 
    @copyright:nnz
    @author:dln
    @date: 2021/8/22 16:34
    @version:v1.0
'''
import threading
def fun_run():
    print('线程{}开始'.format(threading.currentThread().getName()))
    var_01=1
    while True:
        print('线程{}输出的值为：{}'.format(threading.currentThread().getName(),var_01))
        var_01+=1
        pass
    print('线程{}end'.format(threading.currentThread().getName()))
if __name__ == '__main__':
    print('线程{}开始'.format(threading.currentThread().getName()))
    v_object=threading.Thread(target=fun_run,name='xiancheng')
    v_object.setDaemon(True)
    v_object.start()
    for element in range(1,11):
        print('线程{}输出的值为：{}'.format(threading.currentThread().getName(),element))
        pass
    print('线程{}结束'.format(threading.currentThread().getName()))
    pass
